package com.csun.dsms.model.dto.user;

import com.csun.dsms.validator.DsmsSupervisorAddValidator;
import com.csun.dsms.validator.DsmsUserAddValidator;
import com.csun.dsms.validator.DsmsUserEditValidator;
import lombok.Data;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;

/**
 * @author chisj chisj@foxmail.com
 * @version 1.0.0
 * @date 2021-09-14 18:56
 * @description: TODO
 */
@Data
public class UserDto {

    /**
     * id
     */
    @NotNull(message = "{user.id.null}",
            groups = {DsmsUserEditValidator.class})
    private Long id;

    /**
     * 登录名
     */
    @NotNull(message = "{login.name.null}",
            groups = {DsmsUserAddValidator.class, DsmsSupervisorAddValidator.class})
    @NotEmpty(message = "{login.name.null}",
            groups = {DsmsUserAddValidator.class, DsmsSupervisorAddValidator.class})
    private String loginName;

    /**
     * 登录密码
     */
    @NotNull(message = "{login.password.null}",
            groups = {DsmsUserAddValidator.class, DsmsSupervisorAddValidator.class})
    @NotEmpty(message = "{login.password.null}",
            groups = {DsmsUserAddValidator.class, DsmsSupervisorAddValidator.class})
    private String loginPwd;

    /**
     * 姓名
     */
    @NotNull(message = "{user.name.null}",
            groups = {DsmsUserAddValidator.class, DsmsSupervisorAddValidator.class})
    @NotEmpty(message = "{user.name.null}",
            groups = {DsmsUserAddValidator.class, DsmsSupervisorAddValidator.class})
    private String userName;

    /**
     * 手机号
     */
    @NotNull(message = "{mobile.no.null}",
            groups = {DsmsUserAddValidator.class, DsmsSupervisorAddValidator.class})
    @NotEmpty(message = "{mobile.no.null}",
            groups = {DsmsUserAddValidator.class, DsmsSupervisorAddValidator.class})
    private String mobileNo;

    /**
     * 电话
     */
    private String telephone;

    /**
     * 邮件地址
     */
    private String email;

    /**
     * 性别 1-男 0-女
     */
    private Integer sex;

    /**
     * 出生日期，格式yyyy-mm-dd
     */
    private String birthday;

    /**
     * 身份证编号
     */
    private String idCard;

    /**
     * 传真
     */
    private String fax;

    /**
     * 用户头像
     */
    private String headPic;

    /**
     * 状态
     */
    private String status;


    /**
     * 描述
     */
    private String remark;


    /**
     * 角色ID
     */
    @NotNull(message = "{role.id.null}",
            groups = {DsmsUserAddValidator.class})
    private Long roleId;

    /**
     * 单位id
     */
    @NotNull(message = "{unit.id.null}",
            groups = {DsmsUserAddValidator.class, DsmsSupervisorAddValidator.class})
    private Long unitId;

}
